USE [master]
GO

CREATE LOGIN [{1}] WITH PASSWORD = '{2}' ,
  CHECK_EXPIRATION = OFF
GO

USE [{0}]
GO

CREATE USER [{1}]
  FOR LOGIN  [{1}]
  WITH DEFAULT_SCHEMA = [db_owner]
GO

EXEC sp_addrolemember 'db_owner', '{1}'
GO

ALTER LOGIN [{1}]
WITH DEFAULT_DATABASE = [{0}]
GO